package org.elip.teststatistics.server;

import java.io.IOException;

import javax.xml.stream.FactoryConfigurationError;
import javax.xml.stream.XMLStreamException;

import org.elip.teststatistics.client.SuitesService;
import org.elip.teststatistics.server.xml.XMLParser;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;

public class SuitesServiceImpl extends RemoteServiceServlet implements SuitesService {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Override
	public String[] generateSuites(String product) {
		try {
			return XMLParser.parseSuites(product);
		} catch (XMLStreamException e) {
			e.printStackTrace();
		} catch (FactoryConfigurationError e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return null;
	}

}
